row = eval(input("请输入棱形的行数："))
while row % 2 == 0:
    print("请重新输入行数")
    row = eval(input("请输入棱形的行数："))
top_row = (row+1)//2
for i in range(1,top_row+1):
    for j in range(1,top_row-i+1):
        print(' ',end='')
    for k in range(1,2*i):
        print('*',end='')
    print(' ')
botten_row = row - top_row
for i in range(1,botten_row + 1):
    for j in range(1,i+1):
        print(' ',end='')
    for k in range(1,2*(botten_row-i+1)):
        print('*',end='')
    print(' ')